<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <th:block th:include="/common/lib :: lib"></th:block>
    <script>
        function deleteData(id){
            util.ajaxFun("/back/contentType/delete",{"id":id},function (data) {
                util.jump("/back/contentType/list");
            });
        }

    </script>
</head>
<body class="">

    <div th:replace="/common/header :: header"></div>

    <div class="container content-main">
        <div class="row">
            <div class="col-lg-3 hidden-md hidden-xs hidden-sm border-right-1">
                <div th:replace="/common/back_left :: back_left"></div>
            </div>
            <div class="col-lg-9 col-md-12 col-sm-12 ">
                <div class="widget ">
                    <h4 class="title">文章类型</h4>
                    <div class="table-responsive">
                        <div class="btn-group" role="group" aria-label="...">
                            <a href="/back/contentType/add" class="btn btn-default">新增</a>
                        </div>
                        <table class="table table-striped ">
                            <thead>
                            <tr>
                                <th nowrap="">类型</th>
                                <th nowrap="">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="contentType : ${contentTypeList}">
                                <td th:text="${contentType.contentType}"></td>
                                <td>
                                    <a href="#" th:onclick="'javascript:deleteData('+${contentType.id}+')'" class="label label-primary">删除</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
        </div>
    </div>
</body>
</html>